export default {
    isOver: function () {
        let overGetTime = new Date(2019, 8, 1, 23, 59, 59).getTime();
        const now = Date.now()
        if (now > overGetTime) {
            return true
        }
        return false
    },
    scrollResolve: function () {
        let currentPosition, timer;
        let speed = 1;
        timer = setInterval(function () {
            currentPosition = document.documentElement.scrollTop || document.body.scrollTop;
            currentPosition -= speed;
            window.scrollTo(0, currentPosition);//页面向上滚动
            currentPosition += speed;
            window.scrollTo(0, currentPosition);//页面向下滚动
            clearInterval(timer);
        }, 100);
    },
    disabledBack: function () {
        if (window.history && window.history.pushState) {
            window.addEventListener('popstate', function () {
                window.history.pushState('forward', null, '');
                window.history.forward(1);
            });
        }
        window.history.pushState('forward', null, '');
        window.history.forward(1);
    }
}